package com.lightbook.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lightbook.mapper.BookMapper;
import com.lightbook.pojo.Book;
import com.lightbook.pojo.User;
import com.lightbook.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BookServiceImpl extends ServiceImpl<BookMapper, Book> implements BookService {
    @Autowired
    private BookMapper bookMapper;
    @Override
    public IPage<Book> selectPage(Page<Book> pageNum, Book book) {
        return bookMapper.selectPage(pageNum, null);
    }

//    后台管理分页查询方法
    @Override
    public IPage<Book> selectPage2(Page<Object> pageParam, String bookNameVo) {
        IPage<Book> pageModel = baseMapper.selectPage2(pageParam, bookNameVo);
        return pageModel;
    }
}
